package com.example.login.controller;

import com.example.login.entity.Result;
import com.example.login.service.OrderServiceImp;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@CrossOrigin
@RestController
@RequestMapping("order")
public class OrderController extends PublicController{
    @Resource
    private OrderServiceImp orderServiceImp;

    @RequestMapping(value = "grabDorm")
    public Result grabDorm(HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> queryInfo){
        return orderServiceImp.grabDorm(request,response,queryInfo);
    }

    @RequestMapping("getBuildings")
    public List<String> getBuildings(){
        return orderServiceImp.getBuildings();
    }


}